
yinlist=[
	{"name":"zhang","num":123,"yu e":"$1000"},
	{"name":"lin","num":456,"yu e":"$2000"},
	{"name":"wang","num":789,"yu e":"$3000"}]               
def showyin(yinlist):
	"""
	客户信息输出
	"""
	if len(yinlist)==0:
		print("========没有客户信息输出！========")
		return
	print("|{0:<5}| {1:<10}| {2:<5}| {3:<10}|".format("sid","name","num","yu e"))
	print("*"*40)
	for i in range(len(yinlist)):
		print("|{0:<5}| {1:<10}| {2:<5}| {3:<10}|".format(i+1,yinlist[i]["name"],yinlist[i]["num"],yinlist[i]["yu e"]))




while True:

	print("="*12,"欢迎老师","="*12)
	print("{0:1}{1:13}{2:15}".format("","1.查看客户信息","2.客户存钱"))
	print("{0:1}{1:13}{2:15}".format("","3.客户取钱","4.退出系统"))
	print("="*40)
	key = input("请输入对应的值：")
	if key == "1":
		print("="*12,"客户信息浏览","="*12)
		showyin(yinlist)
		input("请按回车键继续：")

	elif key == "2":
		print("="*12,"客户存钱","="*12)
		yin={}
		yin["name"] = input("请输入名字：")
		yin["num"] = input("卡号：")
		yin["yu e"] = input("请输入存款：")
		yinlist.append(yin)
		showyin(yinlist)
		input("请按回车键继续：")
	elif key == "3":
		print("="*12,"客户取钱","="*12)
		showyin(yinlist)
		sid = input("客户取钱编号：")
		del yinlist[int(sid)-1]
		input("按回车键继续：")
	elif key == "4":
		print("="*12,"退出系统","="*12)
		break
	else:
		prinit("="*12,"无效值@！","="*12)
